import java.util.Scanner;
public class Text_Exception {
    public static void main(String[] args) {
       // String s = new String("111");
        System.out.println(s);

        while (true) {
            try {
                getMoney();
                break;
            } catch (Exception e) {
                System.out.println("请输入数字！！！");
            }
        }

    }
    public static void getMoney(){
        Scanner scanner = new Scanner(System.in);
        while (true) {
            System.out.println("请输入价格：");
            double money = scanner.nextDouble();
            if (money > 0){
                System.out.println(money);
                break;
            }else {
                System.out.println("输入不合法，请重新输入！！！");
            }
        }
    }
}
